import baseRequest from './request'

export function PageList({ data = {}, hasLoading = true } = {}) {
    return baseRequest({
        url: '/ScanParking/PageList',
        method: 'POST',
        needLogin: true,
        data,
        hasLoading
    })
}

export function Scan({ data = {}, hasLoading = true } = {}) {
    return baseRequest({
        url: '/ScanParking/Scan',
        method: 'GET',
        needLogin: false,
        data,
        hasLoading
    })
}

export function OpenDoor({ data = {}, hasLoading = true } = {}) {
    return baseRequest({
        url: '/ScanParking/OpenDoor',
        method: 'POST',
        needLogin: true,
        data,
        hasLoading
    })
}

export function Complete({ data = {}, hasLoading = true } = {}) {
    return baseRequest({
        url: '/ScanParking/Complete',
        method: 'POST',
        needLogin: true,
        data,
        hasLoading
    })
}

export function Pay({ data = {}, hasLoading = true } = {}) {
    return baseRequest({
        url: '/ScanParking/Pay',
        method: 'POST',
        needLogin: true,
        data,
        hasLoading
    })
}

// 详情
export function Detail({ data = {}, hasLoading = true } = {}) {
    return baseRequest({
        url: '/ScanParking/Detail',
        method: 'GET',
        needLogin: true,
        data,
        hasLoading
    })
}